<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link href="../../build/common/base.css" rel="stylesheet">

  <link rel="stylesheet" href="../../build/form/form.css">
  <link rel="stylesheet" href="../../build/form/page.css">
  <link rel="stylesheet" href="../../build/form/preview.css">
  <link rel="stylesheet" href="../../assets/js/plugins/icheck/skins/all.css">
  <script type="text/javascript" src="../../build/common/base.js"></script>
  <script type="text/javascript" src="../../build/common/vueEdit.js"></script>
  <script src="../../assets/js/common/element/index.js"></script>

  <style>
    * {
      padding: 0px;
      margin: 0px;
    }

    ul li {
      list-style: none;
    }

    .my_cols {
      margin: 20px 0;
    }

    .my_box {
      height: calc(100% - 43px);
    }

    .my_table thead th {
      white-space: nowrap;
    }

    /* white-space:nowrap; */
  </style>
</head>

<body>
  <div id="ctrlC" style="padding: 0 30px;">
    <!-- <div style="width: 50%; margin: 0 auto; margin-top: 30px;">
      <button @click="handCols()" class="btn btn-primary my_cols consea">隐藏相同项</button>

     

    </div> -->

    <table style="width: 100%;" class="table table-striped table-bordered table_hover text-center mb60">
      <tbody>
        <caption style="text-align: center;">材料库</caption>
        <tr>
          <th>调查名称任务</th>
          <td><input class="form-control" v-model="surbeyObj.dcmcrw" type="text" name="" id="" disabled="disabled"></td>
        </tr>
        <tr>
          <th>调查人员名称</th>
          <td><input class="form-control" v-model="surbeyObj.dcryid" type="text" name="" id="" disabled="disabled"></td>
        </tr>
        <tr>
          <th>开始时间</th>
          <td><input class="form-control" v-model="surbeyObj.kssj" type="text" name="" id="" disabled="disabled"></td>
        </tr>
        <tr>
          <th>频率月次</th>
          <td><input class="form-control" v-model="surbeyObj.plyc" type="text" name="" id="" disabled="disabled"></td>
        </tr>
        <tr>
          <th>状态</th>
          <td><input class="form-control" v-model="surbeyObj.zt" type="text" name="" id="" disabled="disabled"></td>
        </tr>
        <tr>
          <th>调查任务描述</th>
          <td><input class="form-control" v-model="surbeyObj.dcrwms" type="text" name="" id="" disabled="disabled"></td>
        </tr>
      </tbody>
    </table>
    <div style="font-size: 20px;text-align: center;">分包服务库</div>
    <table class="my_table table table-striped table-bordered table_hover text-center mb60">

      <thead>
        <tr>
          <th>
            服务名称
          </th>
          <th>
            一级目录
          </th>
          <th>
            二级目录
          </th>
          <th>
            三级目录
          </th>
          <th>
            四级目录
          </th>
          <th>
            服务说明
          </th>
          <th>
            市场价
          </th>
          <th>
            工程价
          </th>
          <th>
            审核状态
          </th>
          <th>
            审核未通过原因
          </th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
        <tr v-for="(item, index) in fuwuObj" :key="index">
          <td>{{item.servicename}}</td>
          <td>{{item.firstdirectory}}</td>
          <td>{{item.twodirectory}}</td>
          <td>{{item.threedirectory}}</td>
          <td>{{item.fourdirectory}}</td>
          <td>{{item.serviceexplain}}</td>
          <td>{{item.marketvalue}}</td>
          <td>{{item.projectprice}}</td>
          <td>{{item.examinetatus}}</td>
          <td>{{item.reason}}</td>
          <td><a @click="handAddFuwo(item.serviceid)" href="javascript:;"
              class="btn btn-primary btn-sm mr5 btn-outline">录入结果</a></td>
        </tr>
      </tbody>
    </table>
    <div class="listPage o-x-s ng-scope">
      <div class="pr o-x-s my_box_one" style="margin-bottom: 100px">
        <div style="font-size: 20px;text-align: center;">材料库</div>
        <table class="my_table table table-striped table-bordered table_hover text-center mb60">
          <thead>
            <tr>
              <th>
                产品路径
              </th>
              <th>产品路径2</th>
              <th>产品路径3</th>
              <th>产品路径4</th>
              <th>物料编码</th>
              <th>产品名称</th>
              <th>品牌</th>
              <th>货品系列</th>
              <th>产品型号</th>
              <!-- <th>样品照片</th> -->
              <th>规格/尺寸</th>
              <th>单位1</th>
              <th>市场价</th>
              <th>市场价单位</th>
              <th>工程价1</th>
              <th>工程价1</th>
              <th>工程价2</th>
              <th>工程价2</th>
              <th>工程价3</th>
              <th>工程价3</th>
              <th>工程价单位</th>
              <th>工程价格1</th>
              <th>工程价格2</th>
              <th>工程价格3</th>
              <th>工程单位</th>
              <!-- <th>产品手册</th> -->
              <!--<th>安装工艺</th>
              <th>检测报告</th>-->
              <th>官网/网址</th>
              <th>状态</th>
              <!-- <th>审核未通过的原因</th> -->
              <th>操作</th>
            </tr>
          </thead>
          <tbody>
            <tr v-for="(item,index) in cailiaoObj" :key="index">
              <td>{{item.cplj1}}</td>
              <td>{{item.cplj2}}</td>
              <td>{{item.cplj3}}</td>
              <td>{{item.cplj4}}</td>
              <td>{{item.wlbm}}</td>
              <td>{{item.cpmc}}</td>
              <td>{{item.pp}}</td>
              <td>{{item.hpxl}}</td>
              <td>{{item.cpxh}}</td>
              <!-- <td>{{cailiaoObj.ypzp}}</td> -->
              <td>{{item.ggcc}}</td>
              <td>{{item.dw1}}</td>
              <td>{{item.scj}}</td>
              <td>{{item.scjdw}}</td>
              <td>{{item.gcj10}}</td>
              <td>{{item.gcj11}}</td>
              <td>{{item.gcj20}}</td>
              <td>{{item.gcj21}}</td>
              <td>{{item.gcj30}}</td>
              <td>{{item.gcj31}}</td>
              <td>{{item.gcjdw}}</td>
              <td>{{item.gcjg1}}</td>
              <td>{{item.gcjg2}}</td>
              <td>{{item.gcjg3}}</td>
              <td>{{item.gcdw}}</td>
              <!-- <td>{{cailiaoObj.cpsc}}</td> -->
              <!--<td>{{item.azgy}}</td>
              <td>{{item.jcbg}}</td>-->

              <td>{{item.gwwz}}</td>
              <td>{{item.zt}}</td>
              <!-- <td>{{cailiaoObj.reason}}</td> -->
              <td><a @click="handAdd(item.id)" href="javascript:;"
                  class="btn btn-primary btn-sm mr5 btn-outline">录入结果</a></td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>



  </div>
</body>
<script type="text/javascript">

  // $(".consea").click(function () {

  // })






  var vm = new Vue({
    el: "#ctrlC",
    data: function () {
      return {
        surbeyObj: {},
        cailiaoObj: [],
        fuwuObj: [],
        cId: "",
        renwuID: ""
      }
    },
    beforeCreate: function () {
    },
    created: function () {
      var id = location.search.replace("?", "")
      console.log("进来的Id", id)
      var that = this
      var url = "http://192.168.0.114/materials/scdcfpryb/" + id;
      var post = Vue.baseService.get(url);
      post.then(function (res) {
        console.log(res, "任务请求成功")
        that.surbeyObj = res
        that.renwuID = res.id
      }, function (status) {
        if (status == !0) {
          $.Toast.error('加载失败！' + status);
        }
      })

      var url = "http://192.168.0.114/materials/selectlist/" + id;
      var post = Vue.baseService.get(url);
      post.then(function (res) {
        // console.log(res, "分包")
        that.fuwuObj = res

        console.log("分包服务", that.fuwuObj)
        // that.surbeyObj = res
      }, function (status) {
        if (status == !0) {
          $.Toast.error('加载失败！' + status);
        }
      })
      var url = "http://192.168.0.114/materials/selectOne/" + id;
      var post = Vue.baseService.get(url);
      post.then(function (res) {
        console.log(res, "材料")
        that.cailiaoObj = res
        // that.surbeyObj = res
      }, function (status) {
        if (status == !0) {
          $.Toast.error('加载失败！' + status);
        }
      })

    },
    methods: {
      handCols: function () {

      },
      handAddFuwo: function (id) {
        this.cId = id
        var index = layer.open({
          type: 2,
          content: "./addFUwu.html?" + this.renwuID + "," + this.cId + "," + location.search.replace("?", ""),
          area: ['320px', '195px'],
          maxmin: true
        });
        layer.full(index);
      },
      handAdd: function (id) {
        this.cId = id
        var index = layer.open({
          type: 2,
          content: "./add.html?" + this.renwuID + "," + this.cId,
          area: ['320px', '195px'],
          maxmin: true
        });
        layer.full(index);
      }


    },

    watch: {

    }
  });
</script>

</html>